import axios from "@/utils/http"
import { loginReq } from './types/loginReq'
import { registReq } from './types/registReq'
import { priorioty } from './types/priorioty'

import { tokenStore } from '@/store/modules/user';
//登录
export const login = (params: loginReq) => {
    return axios({
        url: "/api/login",
        method: "post",
        params,

    })
}
//注册
export const regist = (params: registReq) => {
    return axios({
        url: "/api/register",
        method: "post",
        params,

    })
}
export const showUsers = (params:Object) => {
    return axios({
        url: "/api/show_users",
        method: "get",
        params,

    })
}
export const modifyPri = (params: priorioty) => {
    return axios({
        url: "/api/modify_quanxian",
        method: "post",
        params,

    })
}
/**
 *
 * @param params
 */
 export const getPri = (params: string) => {
    return axios({
        url: "/api/get_quanxian",
        method: "post",
        params,

    })
}
//退出登录
export const outLogin = (params:Object) => {
    return axios({
        url: "/api/outLogin",
        method: "get",
        params,

    })
}